Integrand size = 21, antiderivative size = 103 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x))^2 \, dx=\frac {3 a^2 x}{4}+\frac {2 a^2 \sin (c+d x)}{d}+\frac {3 a^2 \cos (c+d x) \sin (c+d x)}{4 d}+\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{2 d}-\frac {a^2 \sin ^3(c+d x)}{d}+\frac {a^2 \sin ^5(c+d x)}{5 d} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2836, 2713, 2715, 8} \[ \int \cos ^3(c+d x) (a+a \cos (c+d x))^2 \, dx=\frac {a^2 \sin ^5(c+d x)}{5 d}-\frac {a^2 \sin ^3(c+d x)}{d}+\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \sin (c+d x) \cos ^3(c+d x)}{2 d}+\frac {3 a^2 \sin (c+d x) \cos (c+d x)}{4 d}+\frac {3 a^2 x}{4} \]
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2836
Rubi steps \begin{align*} \text {integral}& = \int \left (a^2 \cos ^3(c+d x)+2 a^2 \cos ^4(c+d x)+a^2 \cos ^5(c+d x)\right ) \, dx \\ & = a^2 \int \cos ^3(c+d x) \, dx+a^2 \int \cos ^5(c+d x) \, dx+\left (2 a^2\right ) \int \cos ^4(c+d x) \, dx \\ & = \frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} \left (3 a^2\right ) \int \cos ^2(c+d x) \, dx-\frac {a^2 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}-\frac {a^2 \text {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{d} \\ & = \frac {2 a^2 \sin (c+d x)}{d}+\frac {3 a^2 \cos (c+d x) \sin (c+d x)}{4 d}+\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{2 d}-\frac {a^2 \sin ^3(c+d x)}{d}+\frac {a^2 \sin ^5(c+d x)}{5 d}+\frac {1}{4} \left (3 a^2\right ) \int 1 \, dx \\ & = \frac {3 a^2 x}{4}+\frac {2 a^2 \sin (c+d x)}{d}+\frac {3 a^2 \cos (c+d x) \sin (c+d x)}{4 d}+\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{2 d}-\frac {a^2 \sin ^3(c+d x)}{d}+\frac {a^2 \sin ^5(c+d x)}{5 d} \\ \end{align*}
Time = 0.07 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.59 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x))^2 \, dx=\frac {a^2 (60 d x+110 \sin (c+d x)+40 \sin (2 (c+d x))+15 \sin (3 (c+d x))+5 \sin (4 (c+d x))+\sin (5 (c+d x)))}{80 d} \]
[In]
[Out]
Time = 2.76 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.62
method | result | size |
parallelrisch | \(\frac {a^{2} \left (60 d x +110 \sin \left (d x +c \right )+\sin \left (5 d x +5 c \right )+5 \sin \left (4 d x +4 c \right )+15 \sin \left (3 d x +3 c \right )+40 \sin \left (2 d x +2 c \right )\right )}{80 d}\) | \(64\) |
risch | \(\frac {3 a^{2} x}{4}+\frac {11 a^{2} \sin \left (d x +c \right )}{8 d}+\frac {a^{2} \sin \left (5 d x +5 c \right )}{80 d}+\frac {a^{2} \sin \left (4 d x +4 c \right )}{16 d}+\frac {3 a^{2} \sin \left (3 d x +3 c \right )}{16 d}+\frac {a^{2} \sin \left (2 d x +2 c \right )}{2 d}\) | \(90\) |
derivativedivides | \(\frac {\frac {a^{2} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+2 a^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(96\) |
default | \(\frac {\frac {a^{2} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+2 a^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(96\) |
parts | \(\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {a^{2} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5 d}+\frac {2 a^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(101\) |
norman | \(\frac {\frac {3 a^{2} x}{4}+\frac {13 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}+\frac {9 a^{2} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {72 a^{2} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}+\frac {7 a^{2} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 a^{2} \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {15 a^{2} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {15 a^{2} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {15 a^{2} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {15 a^{2} x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {3 a^{2} x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(202\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.74 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x))^2 \, dx=\frac {15 \, a^{2} d x + {\left (4 \, a^{2} \cos \left (d x + c\right )^{4} + 10 \, a^{2} \cos \left (d x + c\right )^{3} + 12 \, a^{2} \cos \left (d x + c\right )^{2} + 15 \, a^{2} \cos \left (d x + c\right ) + 24 \, a^{2}\right )} \sin \left (d x + c\right )}{20 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 221 vs. \(2 (94) = 188\).
Time = 0.25 (sec) , antiderivative size = 221, normalized size of antiderivative = 2.15 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x))^2 \, dx=\begin {cases} \frac {3 a^{2} x \sin ^{4}{\left (c + d x \right )}}{4} + \frac {3 a^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{2} + \frac {3 a^{2} x \cos ^{4}{\left (c + d x \right )}}{4} + \frac {8 a^{2} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 a^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {3 a^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{4 d} + \frac {2 a^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} + \frac {5 a^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{4 d} + \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a \cos {\left (c \right )} + a\right )^{2} \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.92 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x))^2 \, dx=\frac {16 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a^{2} - 80 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{2} + 15 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2}}{240 \, d} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.86 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x))^2 \, dx=\frac {3}{4} \, a^{2} x + \frac {a^{2} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {a^{2} \sin \left (4 \, d x + 4 \, c\right )}{16 \, d} + \frac {3 \, a^{2} \sin \left (3 \, d x + 3 \, c\right )}{16 \, d} + \frac {a^{2} \sin \left (2 \, d x + 2 \, c\right )}{2 \, d} + \frac {11 \, a^{2} \sin \left (d x + c\right )}{8 \, d} \]
[In]
[Out]
Time = 17.33 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.02 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x))^2 \, dx=\frac {3\,a^2\,x}{4}+\frac {\frac {3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{2}+7\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\frac {72\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{5}+9\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {13\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^5} \]
[In]
[Out]